<!DOCTYPE html>
<html>
<head><meta name="generator" content="Hexo 3.9.0">
    

    

    



    <meta charset="utf-8">
    
    
    
    
    <title>全国计算机等级考试-Java | 欢迎参观小灰灰的网站哟 ヾ(◍°∇°◍)ﾉﾞ ~ | It&#39;s founded on March 9, 2019 and the open source address for the blog notes https://github.com/YUbuntu0109/YUbuntu0109.github.io</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    
    <meta name="theme-color" content="#3F51B5">
    
    
    <meta name="keywords" content="Java,NCRE">
    <meta name="description" content="NCRE(National Computer Rank Examination) —— 二级Java篇                                                                                                              敲黑板：二级考试的试题都是在往年的试卷中随机抽取的 ! 勿慌 ✧⁺⸜(●˙▾˙">
<meta name="keywords" content="Java,NCRE">
<meta property="og:type" content="article">
<meta property="og:title" content="全国计算机等级考试-Java">
<meta property="og:url" content="https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/index.html">
<meta property="og:site_name" content="欢迎参观小灰灰的网站哟 ヾ(◍°∇°◍)ﾉﾞ ~">
<meta property="og:description" content="NCRE(National Computer Rank Examination) —— 二级Java篇                                                                                                              敲黑板：二级考试的试题都是在往年的试卷中随机抽取的 ! 勿慌 ✧⁺⸜(●˙▾˙">
<meta property="og:locale" content="en">
<meta property="og:image" content="https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/excitement.jpg">
<meta property="og:image" content="https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/awkwardness.jpg">
<meta property="og:updated_time" content="2020-03-31T12:36:02.641Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="全国计算机等级考试-Java">
<meta name="twitter:description" content="NCRE(National Computer Rank Examination) —— 二级Java篇                                                                                                              敲黑板：二级考试的试题都是在往年的试卷中随机抽取的 ! 勿慌 ✧⁺⸜(●˙▾˙">
<meta name="twitter:image" content="https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/excitement.jpg">
    
        <link rel="alternate" type="application/atom+xml" title="欢迎参观小灰灰的网站哟 ヾ(◍°∇°◍)ﾉﾞ ~" href="/atom.xml">
    
    <link rel="shortcut icon" href="/favicon.ico">
    <link rel="stylesheet" href="//unpkg.com/hexo-theme-material-indigo@latest/css/style.css">
    <script>window.lazyScripts=[]</script>

    <!-- custom head -->
    

</head>

<body>
    <div id="loading" class="active"></div>

    <aside id="menu" class="hide" >
  <div class="inner flex-row-vertical">
    <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menu-off">
        <i class="icon icon-lg icon-close"></i>
    </a>
    <div class="brand-wrap" style="background-image:url(/img/brand.jpg)">
      <div class="brand">
        <a href="/" class="avatar waves-effect waves-circle waves-light">
          <img src="/img/my-portrait.jpg">
        </a>
        <hgroup class="introduce">
          <h5 class="nickname">黄宇辉</h5>
          <a href="mailto:3083968068@qq.com" title="3083968068@qq.com" class="mail">3083968068@qq.com</a>
        </hgroup>
      </div>
    </div>
    <div class="scroll-wrap flex-col">
      <ul class="nav">
        
            <li class="waves-block waves-effect">
              <a href="/"  >
                <i class="icon icon-lg icon-home"></i>
                Homepage
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/archives"  >
                <i class="icon icon-lg icon-archives"></i>
                Archives
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/tags"  >
                <i class="icon icon-lg icon-tags"></i>
                Tags
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="/categories"  >
                <i class="icon icon-lg icon-th-list"></i>
                Categories
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://github.com/YUbuntu0109" target="_blank" >
                <i class="icon icon-lg icon-github"></i>
                Github
              </a>
            </li>
        
            <li class="waves-block waves-effect">
              <a href="https://space.bilibili.com/364361791" target="_blank" >
                <i class="icon icon-lg icon-link"></i>
                Bilibili
              </a>
            </li>
        
      </ul>
    </div>
  </div>
</aside>

    <main id="main">
        <header class="top-header" id="header">
    <div class="flex-row">
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light on" id="menu-toggle">
          <i class="icon icon-lg icon-navicon"></i>
        </a>
        <div class="flex-col header-title ellipsis">全国计算机等级考试-Java</div>
        
        <div class="search-wrap" id="search-wrap">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="back">
                <i class="icon icon-lg icon-chevron-left"></i>
            </a>
            <input type="text" id="key" class="search-input" autocomplete="off" placeholder="Search">
            <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="search">
                <i class="icon icon-lg icon-search"></i>
            </a>
        </div>
        
        
        <a href="javascript:;" class="header-icon waves-effect waves-circle waves-light" id="menuShare">
            <i class="icon icon-lg icon-share-alt"></i>
        </a>
        
        <!-- add the background music on Mar 11,2019
        <div>
            <iframe frameborder="no" border="0" marginwidth="0" marginheight="0" width=280 height=52 src="//music.163.com/outchain/player?type=2&id=438801642&auto=1&height=32"></iframe>
        </div>
        -->
    </div>
</header>
<header class="content-header post-header">

    <div class="container fade-scale">
        <h1 class="title">全国计算机等级考试-Java</h1>
        <h5 class="subtitle">
            
                <time datetime="2019-03-15T11:10:42.000Z" itemprop="datePublished" class="page-time">
  2019-03-15
</time>


            
        </h5>
    </div>

    


</header>


<div class="container body-wrap">
    
    <aside class="post-widget">
        <nav class="post-toc-wrap post-toc-shrink" id="post-toc">
            <h4>TOC</h4>
            <ol class="post-toc"><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#NCRE-National-Computer-Rank-Examination-——-二级Java篇"><span class="post-toc-number">1.</span> <span class="post-toc-text">NCRE(National Computer Rank Examination) —— 二级Java篇</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#选择题总结-重点-易错点"><span class="post-toc-number">2.</span> <span class="post-toc-text">选择题总结(重点+易错点)</span></a></li><li class="post-toc-item post-toc-level-3"><a class="post-toc-link" href="#操作题总结-重点-API介绍"><span class="post-toc-number">3.</span> <span class="post-toc-text">操作题总结(重点+API介绍)</span></a><ol class="post-toc-child"><li class="post-toc-item post-toc-level-5"><a class="post-toc-link" href="#后期有时间还写推出NCRE-MySQL-NCRE-C-NCRE-三级数据库等全国计算机等考题目解析-最近忙于备考-所以先写作先放一放"><span class="post-toc-number">3.0.1.</span> <span class="post-toc-text">后期有时间还写推出NCRE-MySQL,NCRE-C,NCRE-三级数据库等全国计算机等考题目解析 ! 最近忙于备考,所以先写作先放一放 ~</span></a></li></ol></li></ol></li></ol>
        </nav>
    </aside>


<article id="post-全国计算机等级考试-Java"
  class="post-article article-type-post fade" itemprop="blogPost">

    <div class="post-card">
        <h1 class="post-card-title">全国计算机等级考试-Java</h1>
        <div class="post-meta">
            <time class="post-time" title="2019-03-15 11:10:42" datetime="2019-03-15T11:10:42.000Z"  itemprop="datePublished">2019-03-15</time>

            


            

        </div>
        <div class="post-content" id="post-content" itemprop="postContent">
            <h3 id="NCRE-National-Computer-Rank-Examination-——-二级Java篇"><a href="#NCRE-National-Computer-Rank-Examination-——-二级Java篇" class="headerlink" title="NCRE(National Computer Rank Examination) —— 二级Java篇"></a>NCRE(National Computer Rank Examination) —— 二级<code>Java</code>篇</h3><ul>
<li><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/2019/03/15/全国计算机等级考试-Java/excitement.jpg" alt title>
                </div>
                <div class="image-caption"></div>
            </figure>
</li>
</ul>
<p><strong><code>敲黑板：二级考试的试题都是在往年的试卷中随机抽取的 ! 勿慌 ✧⁺⸜(●˙▾˙●)⸝⁺✧</code></strong></p>
<ul>
<li><h3 id="选择题总结-重点-易错点"><a href="#选择题总结-重点-易错点" class="headerlink" title="选择题总结(重点+易错点)"></a>选择题总结(<code>重点+易错点</code>)</h3></li>
</ul>
<ol>
<li><p><em>try与catch的匹配是: catch到的异常是try中可能抛出的异常或其子类的实例.</em></p>
</li>
<li><p><em>按照标准的I/O模型,Java提供了三种标准流,分别为：<code>System.in</code> , <code>System.out</code> , <code>System.err</code>.</em></p>
</li>
<li><p><em>属于过滤字节输出流的类是：<code>BufferedOutputSteam</code></em>.</p>
</li>
<li><p><em>当窗口被激活时，调用的窗口事件的方法是：<code>public void windowActivated(WindowEvent)</code></em></p>
</li>
<li><p><em>对类进行并发控制，需要私有属性进行定义变量(private),用锁将方法锁起来<code>synchronized</code>,这样就不会出现并发出现异常情况.</em></p>
</li>
<li><p><em><code>Swing</code>组件的外观与具体平台无关.</em></p>
</li>
<li><p><em>在Java中的开发包1.7之前，switch不支持<code>String</code>类型数据,case值和key值匹配时,程序会报错 !</em></p>
</li>
<li><p><em>在一个类中可以定义为多个名称相同,但参数不同的方法,这种机制叫做：重载.</em></p>
</li>
<li><p><em>匿名内部类也就是没有名字的内部类,正因为没有名字,所以匿名内部类只能使用一次!它通常用来简化代码编写,但使用匿名内部类还有一个前提条            件：<code>必须继承一个父类或实现一个接口 !</code></em></p>
</li>
<li><p><em>类变量必须带有的修饰符为：static</em></p>
</li>
<li><p><em>在Java中二维数组定义的语法为：数据类型[][]数组名=new 数据类型[行数][列数];</em></p>
</li>
<li><p><em>在Java.io包的字节输入流中,过滤器输入流的基类是: <code>FilterInputStream</code></em></p>
</li>
<li><p><em>所有字符输入流都从<code>Reader</code>类继承,所有字符输出流都从<code>Writer</code>类继承.</em></p>
</li>
<li><p><em>Swing除继续沿用了AWT中的<code>FlowLayout,BorderLayout,CardLayout,GridLayout,GridBagLayout</code>布局管理器外,新增了一个<code>BoxLayout</code>布局管理      器.<code>BoxLayout</code>布局管理器按照自上而下(y轴)或者从左到右(x轴)的顺序布局依次加入构件.</em></p>
</li>
<li><p><em>java.awt.event包中定义了适配器类；该包中定义的适配器类包括以下几个:</em> </p>
<ul>
<li><code>ComponentAdapter 构件适配器</code></li>
<li><code>ContainerAdapter 容器适配器</code></li>
<li><code>FocusAdapter 焦点适配器</code></li>
<li><code>MouseAdapter 鼠标适配器</code></li>
<li><code>KeyAdapter 键盘适配器</code></li>
<li><code>MouseMotionAdapter 鼠标运动适配器</code> </li>
<li><code>WindowAdapters 窗口适配器</code></li>
<li><code>而FrameAdapter 不属于事件适配器类 !</code>*</li>
</ul>
</li>
<li><p><em>如果发生下面几种情况时,处于运行状态的线程就进入阻塞状态 :</em></p>
<ul>
<li>线程调用<code>sleep();</code> / <code>join();</code> / <code>wait();</code>方法.</li>
<li>如果线程中使用<code>sychronized</code>来请求对象的所未获得时.</li>
<li>如果线程中有输入/输出操作,则进入阻塞状态;待输入/输出操作结束后,线程进入可运行状态.</li>
</ul>
</li>
<li><p><em>在Java中,使用<code>synchronized</code>关键字标识临界区.Java平台将每个由<code>synchronized</code>语句设置的对象设置一个锁,称为<code>对象锁</code>,它是一种独占的排        他锁,既同一时刻最多只能有一个线程获取该锁,为了能够正常地使用对象锁，对共享数据的所有访问都必须在临界区内.同时临界区的共享数据必须是私       有的,确保只能通过对象的方法才能访问到.</em> </p>
</li>
<li><p><em>算法的空间复杂度是指算法在执行过程中所需的内存空间.算法执行期间所需的存储空间包括3个部分:</em></p>
<ul>
<li>输入数据的存储空间</li>
<li>程序本身所占的存储空间</li>
<li>算法执行过程中所需要的额外空间</li>
</ul>
</li>
<li><p><em><code>需求分析</code>是对待开发软件提出的需求进行分析并给出详细设计,是解决软件做什么的阶段.</em></p>
</li>
<li><p><em>软件设计可以使用的工具有<code>总体结构图</code>,<code>程序流程图</code>,<code>N-S图</code>,<code>PAD图</code>..注意：<code>数据流程图(DFD)</code>是需求分析使用的工具 !</em></p>
</li>
<li><p><em>逻辑设计阶段形成逻辑数据模型(从<code>E-R图</code>向<code>关系模式</code>转换).注意点：关系模式设计属于：<code>逻辑设计</code></em></p>
</li>
<li><p><em>能够运行Java字节码的命令为: <code>javac</code></em></p>
</li>
<li><p><em><code>break</code>在java起到跳出循环的作用.<code>continue</code>是跳过当次循环继续执行下一次循环.</em></p>
</li>
<li><p><em><code>XML</code>只是一个配置文件通过流将XML件读取出来，并不属于字节流 !</em></p>
</li>
<li><p><em><code>yield()</code>该方法与<code>sleep()</code>类似,只是不能由用户指定暂停多长时间,并且<code>yield()</code>方法只能让同优级的线程有执行的机会 !</em></p>
</li>
<li><p><em>javap的作用: <code>Javap</code>是 Java class文件分解器,可以反编译,也可以查看java编译器生成的字节码.</em></p>
</li>
<li><p><em>在数据库设计中,在需求分析阶段建立数据字典.</em></p>
</li>
<li><p><em>注意: 在 <code>/</code> 运算中并不存四舍五入的操作!只取整数部分!</em></p>
</li>
<li><p><em>正则表达式是一种描述某种匹配检索规则的字符串.</em></p>
<ul>
<li>java.util.regex 包中有一个<code>Pattern</code>类,用于进行快速模拟匹配.</li>
<li>java.util.regex 包还具有一个<code>Matcher</code>匹配器类. </li>
</ul>
</li>
<li><p><em><code>javax.swing.text</code>是文本类包,<code>javax.swing.table</code>是表格类包,<code>javax.swing.plaf</code>包括一些对外观样式操作的类和接口.</em></p>
</li>
<li><p><em><code>JFrame</code>是页面容器,<code>JToolBar</code>为工具条(属于容器的一种).</em></p>
</li>
<li><p><em>Java中的线程包含<code>CPU</code>,<code>代码</code>,<code>数据</code>三个部分</em></p>
</li>
<li><p><em><code>interrupt();</code>中断线程:中断状态被清除. <code>start();</code>用于开启一个线程. <code>notify();</code>用于唤醒一个处于等待状态的线程.</em></p>
</li>
<li><p><em>当一个Applet所在的浏览器被最小化以后,不能被调用的Applet方法是<code>init()</code></em></p>
<ul>
<li><code>init();</code> 当浏览器加载applet,进行初始化的时候调用该方法.</li>
<li><code>start();</code> 该方法在<code>init()</code>方法之后调用,当用户从其它页面转到包含applet的页面时该方法也被调用.</li>
<li><code>stop();</code> 在用户离开包含applet的页面时被调用.</li>
<li><code>destroy();</code> 当applet不再被使用,或浏览器退出的时候,该方法被调用.</li>
</ul>
</li>
</ol>
<hr>
<ul>
<li><h3 id="操作题总结-重点-API介绍"><a href="#操作题总结-重点-API介绍" class="headerlink" title="操作题总结(重点+API介绍)"></a>操作题总结(<code>重点+API介绍</code>)</h3></li>
</ul>
<ol>
<li><p><em>数组的算法排序继承于 <code>Comparable</code></em></p>
</li>
<li><p><em>JApplet(<code>init()</code>方法中接收来自html页面上的参数).</em></p>
</li>
<li><p><em>通过<code>setName(String str);</code>为继承Thread的子类的线程初始化名字.</em></p>
</li>
<li><p><em><code>equals();</code>方法比较的是两个字符串的内容是否相等.而 <code>==</code> 符号比较的是: 两个字符串的地址是否相同.</em></p>
</li>
<li><p><em>当程序中涉及鼠标点击事件需要继承<code>MouseAdapter</code>类来对鼠标做出的动作进行相应的回应 !</em></p>
</li>
<li><p><em><code>paint(Graphics g)</code>,调用 <code>g.drawOval();</code>可以画同心圆.</em></p>
</li>
<li><p><em>Applet中绘制指定文本字符串使用：<code>drawString();</code></em></p>
</li>
<li><p><em>Java中String类提供了<code>charAt();</code>方法遍历每个字符.</em> </p>
</li>
<li><p><em>常用布局管理器</em></p>
<ul>
<li><code>FlowLayout</code>,<code>BorderLayout</code>,<code>GridLayout</code>,<code>CardLayout</code>,<code>GridBagLayout</code>.</li>
<li>注意: <code>JLabel</code>对象可以显示文本,图像或同时显示两者,创建对象时,在构造函数中输入要显示的对象即可.</li>
</ul>
</li>
<li><p><em><code>getContentPane();</code>方法获得JFrame的内容面板. <code>getSource();</code> 找到给定名称的资源</em>.</p>
</li>
<li><p><em><code>frame.pack();-Method in class java.awt. Window.</code> 使此窗口的大小适合其子组件的首选大小和布局.</em></p>
</li>
<li><p><em><code>JPanel</code>是Java图形用户界面(GUI)工具包swing中的面板容器类,包含于javax.swing包,是一种轻量级容器,可以加入到<code>JFrame</code>窗体中,所以我们       需要继承此类作为画板供JFrame类来操作</em></p>
</li>
<li><p><em>通过鼠标点击获取相应的请求命令方法为: <code>e.getActionCommand();</code></em></p>
</li>
<li><p><em><code>beep() - Method in class java.awt. Toolkit</code>. 根据本地系统设置和硬件功能发出音频蜂鸣声.</em></p>
<ul>
<li>for example: Toolkit.getDefaultToolkit().beep(); </li>
</ul>
</li>
<li><p><em><code>drawRect(int, int, int, int) - Method in class java.awt.Graphics</code> 绘制指定矩形的轮廓.</em></p>
</li>
<li><p><em><code>DataOutputStream</code> 数据输出流允许应用程序以机器无关方式将Java基本数据类型写到底层输出流,<br> <code>DataInputStream</code> 类提供<code>readChar();</code>方法来读取文件中的字符.</em></p>
</li>
<li><p><em><code>Java IO</code></em></p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">   System.getProperty(<span class="string">"user.dir"</span>);     获取当前的工作路径.</span><br><span class="line">getName();                          方法获取文件名，getPath();获取文件路径.</span><br><span class="line">isDirectory();                      判断是否是文件.</span><br></pre></td></tr></table></figure>
</li>
</ol>
<ol start="19">
<li><p><em><code>extends Thread</code> 与 <code>implements Runnable</code> 使用</em></p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line">   当通过`implements Runnable`创建线程:将实现了Runnable接口的对象作为`target`参数传递给Thread类即可,格式如下:</span><br><span class="line"><span class="keyword">new</span> Thread(`实现了Runnable接口的对象名`);</span><br><span class="line">举例:	</span><br><span class="line">	<span class="keyword">public</span> <span class="class"><span class="keyword">class</span> <span class="title">Java_2</span> <span class="keyword">implements</span> <span class="title">Runnable</span> </span>&#123; </span><br><span class="line"> 		    <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">void</span> <span class="title">main</span><span class="params">(String[]args)</span> </span>&#123;</span><br><span class="line">     			Java_2 r = <span class="keyword">new</span> Java_2();</span><br><span class="line">     		        Thread t = <span class="keyword">new</span> Thread( r );</span><br><span class="line">    			       t.start(); </span><br><span class="line"> 			 &#125;···</span><br><span class="line"></span><br><span class="line">   通过`extends Thread`创建线程:</span><br><span class="line">Thread本身实现了`Runnable`接口,重写其`run()`方法即可;线程创建后,需要调用`start();`方法运行.</span><br></pre></td></tr></table></figure>
</li>
<li><figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">setPreferredSize(<span class="keyword">new</span> Dimension(<span class="number">280</span>, <span class="number">60</span>));</span><br><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">setPreferredSize</span><span class="params">(Dimension preferredSize)</span></span>&#123;...&#125;</span><br><span class="line"></span><br><span class="line">将此组件的首选大小设置为常量值. 随后`getPreferredSize()`总是返回此值.将首选大小设置为`<span class="keyword">null</span>`可恢复默认行为. </span><br><span class="line">`Dimension` : 类封装单个对象中组件的宽度和高度(以整数精度).</span><br></pre></td></tr></table></figure>
</li>
<li><p><em><code>DecimalFormat</code>类提供的<code>format();</code>方法可以将数据格式化.</em></p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">public</span> class DecimalFormat extends <span class="title">NumberFormatDecimalFormat</span><span class="params">()</span></span>&#123;...&#125;</span><br><span class="line"></span><br><span class="line">`DecimalFormat`是格式为十进制数的NumberFormat的具体子类. 它具有各种功能,旨在使任何地区的数字解析和格式化,包括支持西方,阿拉伯语和印度数字。它还支持不同类型的数字,包括整数(<span class="number">123</span>..),定点数(<span class="number">123.4</span>),科学记数法(<span class="number">1.23E4</span>),百分比(<span class="number">12</span>％),和货币金额(<span class="number">123</span>美元),所有这些都可以进行本地化.</span><br></pre></td></tr></table></figure>
</li>
<li><p><em>窗体事件</em></p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line">setDefaultCloseOperation();     设置用户在此窗口上发起<span class="string">"close"</span>时默认执行操作.</span><br><span class="line">JFrame.EXIT_ON_CLOSE;           `close`式关闭程序退出窗口.</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> example: frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);</span><br></pre></td></tr></table></figure>
</li>
<li><p><em>常用事件类</em></p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line"><span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">addActionListener</span><span class="params">(ActionListener e)</span></span>&#123;..&#125;</span><br><span class="line">添加指定的动作侦听器以从此按钮接收动作事件.当用户按下或释放鼠标在此按钮上时,会发生动作事件.如果`e`为空,则不会抛出任何异常.</span><br><span class="line">也不会执行任何操作.</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> example: saveButton.addActionListener(<span class="keyword">this</span>);</span><br></pre></td></tr></table></figure>
</li>
</ol>
<hr>
<ul>
<li><p><strong>哎哟终于写好了 ! 伸个懒腰 ٩(๑❛ᴗ❛๑)۶ ~ 最近没零花钱买<code>麦斯威尔</code>了,然后每天的状态就像下面的俺的小黄人一样  ╰( ´・ω・)つ──☆✿✿✿</strong></p>
</li>
<li><figure class="image-bubble">
                <div class="img-lightbox">
                    <div class="overlay"></div>
                    <img src="/2019/03/15/全国计算机等级考试-Java/awkwardness.jpg" alt title>
                </div>
                <div class="image-caption"></div>
            </figure>
</li>
<li><h5 id="后期有时间还写推出NCRE-MySQL-NCRE-C-NCRE-三级数据库等全国计算机等考题目解析-最近忙于备考-所以先写作先放一放"><a href="#后期有时间还写推出NCRE-MySQL-NCRE-C-NCRE-三级数据库等全国计算机等考题目解析-最近忙于备考-所以先写作先放一放" class="headerlink" title="后期有时间还写推出NCRE-MySQL,NCRE-C,NCRE-三级数据库等全国计算机等考题目解析 ! 最近忙于备考,所以先写作先放一放 ~"></a>后期有时间还写推出<code>NCRE-MySQL</code>,<code>NCRE-C</code>,<code>NCRE-三级数据库</code>等全国计算机等考题目解析 ! 最近忙于备考,所以先写作先放一放 ~</h5></li>
</ul>

        </div>

        <blockquote class="post-copyright">
    
    <div class="content">
        
<span class="post-time">
    Last updated: <time datetime="2020-03-31T12:36:02.641Z" itemprop="dateUpdated">2020-03-31 12:36:02</time>
</span><br>


        
    </div>
    
    <footer>
        <a href="https://yubuntu0109.github.io">
            <img src="/img/my-portrait.jpg" alt="黄宇辉">
            黄宇辉
        </a>
    </footer>
</blockquote>

        
<div class="page-reward">
    <a id="rewardBtn" href="javascript:;" class="page-reward-btn waves-effect waves-circle waves-light">赏</a>
</div>



        <div class="post-footer">
            
	<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/Java/">Java</a></li><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/NCRE/">NCRE</a></li></ul>


            
<div class="page-share-wrap">
    

<div class="page-share" id="pageShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/&title=《全国计算机等级考试-Java》 — 欢迎参观小灰灰的网站哟 ヾ(◍°∇°◍)ﾉﾞ ~&pic=https://yubuntu0109.github.io/img/my-portrait.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/&title=《全国计算机等级考试-Java》 — 欢迎参观小灰灰的网站哟 ヾ(◍°∇°◍)ﾉﾞ ~&source=My Personal Website For Blog" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《全国计算机等级考试-Java》 — 欢迎参观小灰灰的网站哟 ヾ(◍°∇°◍)ﾉﾞ ~&url=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/&via=https://yubuntu0109.github.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>



    <a href="javascript:;" id="shareFab" class="page-share-fab waves-effect waves-circle">
        <i class="icon icon-share-alt icon-lg"></i>
    </a>
</div>



        </div>
    </div>

    
<nav class="post-nav flex-row flex-justify-between">
  
    <div class="waves-block waves-effect prev">
      <a href="/2019/03/16/static-keyword/" id="post-prev" class="post-nav-link">
        <div class="tips"><i class="icon icon-angle-left icon-lg icon-pr"></i> Prev</div>
        <h4 class="title">static keyword</h4>
      </a>
    </div>
  

  
    <div class="waves-block waves-effect next">
      <a href="/2019/03/14/JDBC-常见错误分析/" id="post-next" class="post-nav-link">
        <div class="tips">Next <i class="icon icon-angle-right icon-lg icon-pl"></i></div>
        <h4 class="title">JDBC 常见错误分析</h4>
      </a>
    </div>
  
</nav>



    




















</article>

<div id="reward" class="page-modal reward-lay">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <h3 class="reward-title">
        <i class="icon icon-quote-left"></i>
        thanks ~
        <i class="icon icon-quote-right"></i>
    </h3>
    <div class="reward-content">
        
        <div class="reward-code">
            <img id="rewardCode" src="/img/Wechat_appreciates.png" alt="打赏二维码">
        </div>
        
    </div>
</div>



</div>

        <footer class="footer">
    <div class="top">
        

        <p>
            
                <span><a href="/atom.xml" target="_blank" class="rss" title="rss"><i class="icon icon-lg icon-rss"></i></a></span>
            
            <span>This blog is licensed under a <a rel="license" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.</span>
        </p>
    </div>
    <div class="bottom">
        <!-- 统计网站用户访问量. 技术支持：不蒜子(http://busuanzi.ibruce.info/) ————> Mar 13,2019 -->
        <p>
            <font style='font-size: 12px;color:springgreen'>
                    <div align="center">
                        <!-- 安装脚本 -->
                        <script async src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
                        <!-- 安装标签 -->
                        <span id="busuanzi_container_site_pv">
                            ◎用户总访问量 : <span id="busuanzi_value_site_pv"></span> 次 ~ &nbsp&nbsp
                        </span>
                        <span id="busuanzi_container_site_uv">
                            ◎总访客数(（づ￣3￣）づ╭❤～) : <span id="busuanzi_value_site_uv"></span>人 ~
                        </span>
                    </div>
                </font>
            </p>
            <!---------->
            <p>
                <font style='font-size: 10px'>
                    <span>黄宇辉 &copy; 2019 - 2020</span>
                    <span>
                        
                        Blog source <a href="https://github.com/YUbuntu0109/YUbuntu0109.github.io" target="_blank">Github</a> 
                        Power by <a href="http://hexo.io/" target="_blank">Hexo</a>
                        Theme <a href="https://github.com/yscoder/hexo-theme-indigo" target="_blank">indigo</a>
                    </span>
                </font>
            </p>
        </div>
    </footer>
    </main>
    <div class="mask" id="mask"></div>
<a href="javascript:;" id="gotop" class="waves-effect waves-circle waves-light"><span class="icon icon-lg icon-chevron-up"></span></a>



<div class="global-share" id="globalShare">
    <ul class="reset share-icons">
      <li>
        <a class="weibo share-sns" target="_blank" href="http://service.weibo.com/share/share.php?url=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/&title=《全国计算机等级考试-Java》 — 欢迎参观小灰灰的网站哟 ヾ(◍°∇°◍)ﾉﾞ ~&pic=https://yubuntu0109.github.io/img/my-portrait.jpg" data-title="微博">
          <i class="icon icon-weibo"></i>
        </a>
      </li>
      <li>
        <a class="weixin share-sns wxFab" href="javascript:;" data-title="微信">
          <i class="icon icon-weixin"></i>
        </a>
      </li>
      <li>
        <a class="qq share-sns" target="_blank" href="http://connect.qq.com/widget/shareqq/index.html?url=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/&title=《全国计算机等级考试-Java》 — 欢迎参观小灰灰的网站哟 ヾ(◍°∇°◍)ﾉﾞ ~&source=My Personal Website For Blog" data-title=" QQ">
          <i class="icon icon-qq"></i>
        </a>
      </li>
      <li>
        <a class="facebook share-sns" target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/" data-title=" Facebook">
          <i class="icon icon-facebook"></i>
        </a>
      </li>
      <li>
        <a class="twitter share-sns" target="_blank" href="https://twitter.com/intent/tweet?text=《全国计算机等级考试-Java》 — 欢迎参观小灰灰的网站哟 ヾ(◍°∇°◍)ﾉﾞ ~&url=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/&via=https://yubuntu0109.github.io" data-title=" Twitter">
          <i class="icon icon-twitter"></i>
        </a>
      </li>
      <li>
        <a class="google share-sns" target="_blank" href="https://plus.google.com/share?url=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/" data-title=" Google+">
          <i class="icon icon-google-plus"></i>
        </a>
      </li>
    </ul>
 </div>


<div class="page-modal wx-share" id="wxShare">
    <a class="close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <img src="//api.qrserver.com/v1/create-qr-code/?data=https://yubuntu0109.github.io/2019/03/15/全国计算机等级考试-Java/" alt="微信分享二维码">
</div>




    <script src="//cdn.bootcss.com/node-waves/0.7.4/waves.min.js"></script>
<script>
var BLOG = { ROOT: '/', SHARE: true, REWARD: true };


</script>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/main.min.js"></script>


<div class="search-panel" id="search-panel">
    <ul class="search-result" id="search-result"></ul>
</div>
<template id="search-tpl">
<li class="item">
    <a href="{path}" class="waves-block waves-effect">
        <div class="title ellipsis" title="{title}">{title}</div>
        <div class="flex-row flex-middle">
            <div class="tags ellipsis">
                {tags}
            </div>
            <time class="flex-col time">{date}</time>
        </div>
    </a>
</li>
</template>

<script src="//unpkg.com/hexo-theme-material-indigo@latest/js/search.min.js" async></script>








<script>
(function() {
    var OriginTitile = document.title, titleTime;
    document.addEventListener('visibilitychange', function() {
        if (document.hidden) {
            document.title = 'Where are you going ?';
            clearTimeout(titleTime);
        } else {
            document.title = 'As long as you love me ~';
            titleTime = setTimeout(function() {
                document.title = OriginTitile;
            },2000);
        }
    });
})();
</script>



</body>
</html>
